@using MockSchoolManagement.Extensions
@model MockSchoolManagement.ViewModels.HomeDetailsViewModel

@{
    ViewBag.Title = "学生详情";
    var photoPath = $"~/images/noimage.png";
    if (Model.Student.PhotoPath != null)
    {
        photoPath = $"~/images/avatars/{Model.Student.PhotoPath}";
    }
}

<h3>@ViewBag.PageTitle</h3>


<div class="row justify-content-center m-3">
    <div class="col-sm-6">
        <div class="card">
            <div class="card-header">
                <h1>@Model.Student.Name</h1>
            </div>
            <div class="card-body text-center">
                <img class="card-img-top" src="@photoPath" alt="" asp-append-version="true"/>
                <h4>学生ID：@Model.Student.Id</h4>
                <h4>邮箱：@Model.Student.Email</h4>
                <h4>主修科目：@Model.Student.Major.GetDisplayName()</h4>
            </div>
            <div class="card-footer">
                <a href="#" class="btn btn-primary">返回</a>
                <a href="#" class="btn btn-primary">编辑</a>
                <a href="#" class="btn btn-primary">删除</a>
            </div>
        </div>
    </div>
</div>


@section Scripts
{
    <script src="~/js/CustomScript.js"></script>
}
